﻿using Ninject;
using Ninject.Extensions.Wcf.Client;
using Ninject.Modules;

namespace HobSoft.SoccerBet2014.Client
{
    using Domain.ClientService;
    using ViewModels;
    using Factory;
    public class ApplicationIocModule : NinjectModule
    {
        public override void Load()
        {
            Bind<IBetCustomDataService>()
                .ToServiceChannel();
            Bind<IBfCustomDataService>()
                .ToServiceChannel();
            Bind<ISystemService>()
                .ToServiceChannel();
            Bind<IBetSiteProxyService>()
                .To<Service.BetSiteProxyService>()
                .InSingletonScope();
            Bind<IBfRequestService>()
                .To<Service.BfRequestService>()
                .InSingletonScope();

            Bind<BetShellModel>()
                .ToSelf()
                .InSingletonScope();
            Bind<AccountShellModel>()
                .ToSelf()
                .InSingletonScope();
            Bind<OddsTypeShellModels>()
                .ToSelf()
                .InSingletonScope();
            Bind<ConfigurationShellModel>()
                .ToSelf()
                .InSingletonScope();
            Bind<OrderShellModel>()
                .ToSelf()
                .InSingletonScope();
            Bind<LogShellModel>()
                .ToSelf()
                .InSingletonScope();

            Bind<OddsGroup>()
                .ToSelf();
            Bind<Odds>()
                .ToSelf();
            Bind<Game>()
                .ToSelf();
            Bind<BfEvent>()
                .ToSelf();
            Bind<BfMarket>()
                .ToSelf();
            Bind<Runner>()
                .ToSelf();
            Bind<BfRunnerTransaction>()
                .ToSelf();
            Bind<BetInfo>()
                .ToSelf();
            Bind<BmOrder>()
                .ToSelf();
            Bind<BfOrder>()
                .ToSelf();

            Bind<IViewModelFactory>()
                .To<ViewModelFactory>()
                .InSingletonScope();
            Bind<IWindowFactory>()
                .To<WindowFactory>()
                .InSingletonScope();
        }
    }
}
